import math

L = ['Bart', 'Lisa', 'Adam']

for name in L:
    print("Hello,{}!".format(name))
    
n1 = 255
n2 = 1000 
print("hex(255):{}, hex(1000):{}".format(hex(n1), hex(n2)))



def quadratic(a, b, c):
    root1 = ((-b) - math.sqrt((b**2) - (4*a*c))) / (2*a)
    root2 = ((-b) + math.sqrt((b**2) - (4*a*c))) / (2*a)
    return root2, root1

# 测试:
print('quadratic(2, 3, 1) =', quadratic(2, 3, 1))
print('quadratic(1, 3, -4) =', quadratic(1, 3, -4))

if quadratic(2, 3, 1) != (-0.5, -1.0):
    print('测试失败')
elif quadratic(1, 3, -4) != (1.0, -4.0):
    print('测试失败')
else:
    print('测试成功')
    
print("-------------------------------关键字参数---------------------------------------")

def person(name, age, **kw):
    print("name:", name, "age:", age, "other:", kw)
    
person("jack", 22, city = "长沙", grilfriend = "小宋")